<layout name='Layout/layout_page' />

	<ol class="breadcrumb">
		<li><a href="<{:U('Chat/index')}>"><{:L('_menu_chat')}></a></li>
      	<li class="active"><{:L(_public_list)}></li>
    </ol>

	<form class="form-inline" method="get" action="index.php">
  		<div class="form-group">
    		<label>Keywords</label>
    		<input type="text" class="form-control input-sm" name="key" value="<{$key}>">
  		</div>
		<button type="submit" class="btn btn-default btn-sm"><{:L('_public_search')}></button>
		<input type="hidden" name="m" value="Admin" />
		<input type="hidden" name="c" value="Chat" />
		<input type="hidden" name="a" value="index" />
	</form>
	<p></p>
	<form id="ajaxForm" method="post" action="<{:U('Chat/delall')}>" name="form1" class="form-horizontal form-validata">
	<TABLE class="table table-striped table-bordered table-hover">
	  <THEAD>
		<tr>
		  <TH><input class="checkall" name="checkall" type="checkbox" id="checkall" onClick="CheckAll(this.form)"/> <{:L("_public_select")}></TH>
		  <TH>FormName</TH>
		  <TH>ToName</TH>
		  <TH>Content</TH> 
		  <TH>Date Add</TH>
		  <TH>Action</TH>
		</tr>
	  </THEAD>
	  <TBODY>             
			<volist name="list" id="vo">
			<tr>
			  <td><input type="checkbox" name="selectedids[]" value="<{$vo.id}>" id="<{$vo.id}>"> <{$vo.id}></td>
			  <td><{$vo.fromName}></td>
			  <td><{$vo.toName}></td>
			  <td><{$vo.content}></td>
              <td><{$vo.createTime|date='F,d,Y H:i:s',###}></td>
              <td><a class="btn btn-info btn-sm" onClick="if(!confirm('Cannot be recovered after deletion!'))return false;" href="<{:U('Chat/del',array('id'=>$vo['id']))}>"><i class="glyphicon glyphicon-trash"></i> <{:L('_public_del')}></a></td>
			</tr>
			</volist>
	  </TBODY>
	</TABLE>

	<div class="row">
		<div class="col-md-6">
			<button class="btn btn-info btn-sm" onClick="if(!confirm('Cannot be recovered after deletion!'))return false;"><i class="glyphicon glyphicon-trash"></i> Delete selected message</button>
		</div>
		
		<div class="col-md-6">
			<div class="page">
				<nav>
  					<ul class="pagination"><{$page}></ul>
  				</nav>
  			</div>
		</div>
	</div>
	</form>

<script>
function showModel(remote){
  $('#myModal').modal({
    remote : remote
  });

  $("#myModal").on("hidden.bs.modal", function() {
    $(this).removeData("bs.modal");
  })
}
</script>     
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
      <div class="modal-content"></div>
  </div>
</div>

<input type="hidden" id="menu_action" value="feedbook" />

<script type="text/javascript">

</script>